package cn.gson.springboot.model.pjos;

import javax.persistence.Column;
import javax.persistence.Id;
import java.io.Serializable;
import java.util.Objects;

public class ZsidesmodelmiddleEntityPK implements Serializable {
    private int psId;
    private int specId;

    @Column(name = "ps_id", nullable = false)
    @Id
    public int getPsId() {
        return psId;
    }

    public void setPsId(int psId) {
        this.psId = psId;
    }

    @Column(name = "spec_id", nullable = false)
    @Id
    public int getSpecId() {
        return specId;
    }

    public void setSpecId(int specId) {
        this.specId = specId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ZsidesmodelmiddleEntityPK that = (ZsidesmodelmiddleEntityPK) o;
        return psId == that.psId &&
                specId == that.specId;
    }

    @Override
    public int hashCode() {
        return Objects.hash(psId, specId);
    }
}
